package one.stand.controller;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import one.stand.model.ResultModel;
import one.stand.request.OfficialApplyRequest;
import one.stand.request.OfficialContactRequest;
import one.stand.request.OfficialFromRequest;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * 官网表单提交信息管理
 * @author zrh
 */
@RestController
@RequestMapping("userApi/official")
@Api(description = "官网表单提交信息管理")
public class OfficialController extends BaseController {

    @PostMapping("/saveOfficialApply")
    @ApiOperation(value = "添加官网申请信息表单")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "name", value = "姓名", paramType = "String"),
            @ApiImplicitParam(name = "intention", value = "意向", paramType = "Integer"),
            @ApiImplicitParam(name = "phone", value = "电话", paramType = "String"),
            @ApiImplicitParam(name = "wechat", value = "微信号", paramType = "String"),
    })
    public ResultModel saveOfficialApply(OfficialApplyRequest request){
        return userFegin.saveOfficialApply(request);
    }

    @PostMapping("/saveOfficialContact")
    @ApiOperation(value = "添加官网联系我们信息表单")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "name", value = "姓名", paramType = "String"),
            @ApiImplicitParam(name = "phone", value = "电话", paramType = "String"),
            @ApiImplicitParam(name = "email", value = "邮箱", paramType = "String"),
            @ApiImplicitParam(name = "remark", value = "备注", paramType = "String"),
    })
    public ResultModel saveOfficialContact(OfficialContactRequest request){
        return userFegin.saveOfficialContact(request);
    }

    @PostMapping("/saveOfficialFrom")
    @ApiOperation(value = "添加官网表单信息")
    @ApiImplicitParams({
            @ApiImplicitParam(name = "phone", value = "电话", paramType = "String"),
            @ApiImplicitParam(name = "type", value = "类型", paramType = "Integer"),
    })
    public ResultModel saveOfficialFrom(OfficialFromRequest request){
        return userFegin.saveOfficialFrom(request);
    }

}
